package com.itany.cloud.controller;

import com.itany.cloud.entity.Dept;
import com.itany.cloud.service.DeptService;
import com.itany.cloud.util.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 石小俊
 */
@RestController
@RequestMapping("/dept")
public class DeptController {
    @Autowired
    private DeptService deptService;

    @PostMapping
    public ResponseResult addDept(Dept dept){
        deptService.addDept(dept);
        return ResponseResult.success("成功添加部门与员工");
    }

}
